#include <bits/stdc++.h>
using namespace std;

int main()
{
   int n;
   cin >> n;
     double s = 1;
   long long j = 1;
   for (int i = 1; i <= n; i++)
   {
      j *= i;
      s += 1.0 / (long double)j;
   }
   printf("%.10lf", s);
}